<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Module      :  Distribution.Simple.InstallDirs</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Copyright   :  Isaac Jones 2003-2004</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- This manages everything to do with where files get installed (though does</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- not get involved with actually doing any installation). It provides an</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- 'InstallDirs' type which is a set of directories for where to install</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- things. It also handles the fact that we use templates in these install</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- dirs. For example most install dirs are relative to some @$prefix@ and by</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- changing the prefix all other dirs still end up changed appropriately. So it</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- provides a 'PathTemplate' type and functions for substituting for these</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- templates.</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.InstallDirs</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier">InstallDirs</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier">InstallDirTemplates</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs"><span class="hs-identifier">defaultInstallDirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier">defaultInstallDirs'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#combineInstallDirs"><span class="hs-identifier">combineInstallDirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#absoluteInstallDirs"><span class="hs-identifier">absoluteInstallDirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyDest"><span class="hs-identifier">CopyDest</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#prefixRelativeInstallDirs"><span class="hs-identifier">prefixRelativeInstallDirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#substituteInstallDirTemplates"><span class="hs-identifier">substituteInstallDirTemplates</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier">PathTemplate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#PathTemplateVariable"><span class="hs-identifier">PathTemplateVariable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier">PathTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier">toPathTemplate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier">fromPathTemplate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#combinePathTemplate"><span class="hs-identifier">combinePathTemplate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier">substPathTemplate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier">initialPathTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#platformTemplateEnv"><span class="hs-identifier">platformTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#compilerTemplateEnv"><span class="hs-identifier">compilerTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#packageTemplateEnv"><span class="hs-identifier">packageTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#abiTemplateEnv"><span class="hs-identifier">abiTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#installDirsTemplateEnv"><span class="hs-identifier">installDirsTemplateEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Environment.html"><span class="hs-identifier">Distribution.Compat.Environment</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/System.Environment.html#lookupEnv"><span class="hs-identifier">lookupEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compiler.html"><span class="hs-identifier">Distribution.Compiler</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html"><span class="hs-identifier">Distribution.Simple.InstallDirs.Internal</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#getAppUserDataDirectory"><span class="hs-identifier">getAppUserDataDirectory</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#isPathSeparator"><span class="hs-identifier">isPathSeparator</span></a></span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#pathSeparator"><span class="hs-identifier">pathSeparator</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#dropDrive"><span class="hs-identifier">dropDrive</span></a></span><span>
</span><span id="line-66"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier">takeDirectory</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-cpp">

#ifdef mingw32_HOST_OS
</span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.html#"><span class="hs-identifier">Foreign</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.html#"><span class="hs-identifier">Foreign.C</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- Installation directories</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-comment">-- | The directories where we will install files for packages.</span><span>
</span><span id="line-79"></span><span class="hs-comment">--</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- We have several different directories for different types of files since</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- many systems have conventions whereby different types of files in a package</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- are installed in different directories. This is particularly the case on</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- Unix style systems.</span><span>
</span><span id="line-84"></span><span class="hs-comment">--</span><span>
</span><span id="line-85"></span><span id="local-6989586621679680183"><span id="local-6989586621679680184"></span></span><span class="hs-keyword">data</span><span> </span><span id="InstallDirs"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-var">InstallDirs</span></a></span></span><span> </span><span id="local-6989586621679680681"><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="InstallDirs"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-var">InstallDirs</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-86"></span><span>        </span><span id="prefix"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-87"></span><span>        </span><span id="bindir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-88"></span><span>        </span><span id="libdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>        </span><span id="libsubdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-90"></span><span>        </span><span id="dynlibdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-91"></span><span>        </span><span id="flibdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var hs-var">flibdir</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- ^ foreign libraries</span><span>
</span><span id="line-92"></span><span>        </span><span id="libexecdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var hs-var">libexecdir</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-93"></span><span>        </span><span id="libexecsubdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var hs-var">libexecsubdir</span></a></span></span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-94"></span><span>        </span><span id="includedir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-95"></span><span>        </span><span id="datadir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-96"></span><span>        </span><span id="datasubdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-97"></span><span>        </span><span id="docdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-98"></span><span>        </span><span id="mandir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var hs-var">mandir</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-99"></span><span>        </span><span id="htmldir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-100"></span><span>        </span><span id="haddockdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var hs-var">haddockdir</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-101"></span><span>        </span><span id="sysconfdir"><span class="annot"><span class="annottext">forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var hs-var">sysconfdir</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679680681"><span class="hs-identifier hs-type">dir</span></a></span><span>
</span><span id="line-102"></span><span>    </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679680146"><span id="local-6989586621679680164"><span class="annot"><span class="annottext">InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
(InstallDirs dir -&gt; InstallDirs dir -&gt; Bool)
-&gt; (InstallDirs dir -&gt; InstallDirs dir -&gt; Bool)
-&gt; Eq (InstallDirs dir)
forall dir. Eq dir =&gt; InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
$c/= :: forall dir. Eq dir =&gt; InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
== :: InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
$c== :: forall dir. Eq dir =&gt; InstallDirs dir -&gt; InstallDirs dir -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679680084"><span id="local-6989586621679680138"><span id="local-6989586621679680141"><span id="local-6989586621679680143"><span class="annot"><span class="annottext">ReadPrec [InstallDirs dir]
ReadPrec (InstallDirs dir)
Int -&gt; ReadS (InstallDirs dir)
ReadS [InstallDirs dir]
(Int -&gt; ReadS (InstallDirs dir))
-&gt; ReadS [InstallDirs dir]
-&gt; ReadPrec (InstallDirs dir)
-&gt; ReadPrec [InstallDirs dir]
-&gt; Read (InstallDirs dir)
forall dir. Read dir =&gt; ReadPrec [InstallDirs dir]
forall dir. Read dir =&gt; ReadPrec (InstallDirs dir)
forall dir. Read dir =&gt; Int -&gt; ReadS (InstallDirs dir)
forall dir. Read dir =&gt; ReadS [InstallDirs dir]
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [InstallDirs dir]
$creadListPrec :: forall dir. Read dir =&gt; ReadPrec [InstallDirs dir]
readPrec :: ReadPrec (InstallDirs dir)
$creadPrec :: forall dir. Read dir =&gt; ReadPrec (InstallDirs dir)
readList :: ReadS [InstallDirs dir]
$creadList :: forall dir. Read dir =&gt; ReadS [InstallDirs dir]
readsPrec :: Int -&gt; ReadS (InstallDirs dir)
$creadsPrec :: forall dir. Read dir =&gt; Int -&gt; ReadS (InstallDirs dir)
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679680058"><span id="local-6989586621679680060"><span id="local-6989586621679680080"><span class="annot"><span class="annottext">Int -&gt; InstallDirs dir -&gt; ShowS
[InstallDirs dir] -&gt; ShowS
InstallDirs dir -&gt; FilePath
(Int -&gt; InstallDirs dir -&gt; ShowS)
-&gt; (InstallDirs dir -&gt; FilePath)
-&gt; ([InstallDirs dir] -&gt; ShowS)
-&gt; Show (InstallDirs dir)
forall dir. Show dir =&gt; Int -&gt; InstallDirs dir -&gt; ShowS
forall dir. Show dir =&gt; [InstallDirs dir] -&gt; ShowS
forall dir. Show dir =&gt; InstallDirs dir -&gt; FilePath
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [InstallDirs dir] -&gt; ShowS
$cshowList :: forall dir. Show dir =&gt; [InstallDirs dir] -&gt; ShowS
show :: InstallDirs dir -&gt; FilePath
$cshow :: forall dir. Show dir =&gt; InstallDirs dir -&gt; FilePath
showsPrec :: Int -&gt; InstallDirs dir -&gt; ShowS
$cshowsPrec :: forall dir. Show dir =&gt; Int -&gt; InstallDirs dir -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679680053"><span id="local-6989586621679680055"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; InstallDirs a -&gt; InstallDirs b)
-&gt; (forall a b. a -&gt; InstallDirs b -&gt; InstallDirs a)
-&gt; Functor InstallDirs
forall a b. a -&gt; InstallDirs b -&gt; InstallDirs a
forall a b. (a -&gt; b) -&gt; InstallDirs a -&gt; InstallDirs b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; InstallDirs b -&gt; InstallDirs a
$c&lt;$ :: forall a b. a -&gt; InstallDirs b -&gt; InstallDirs a
fmap :: forall a b. (a -&gt; b) -&gt; InstallDirs a -&gt; InstallDirs b
$cfmap :: forall a b. (a -&gt; b) -&gt; InstallDirs a -&gt; InstallDirs b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. InstallDirs dir -&gt; Rep (InstallDirs dir) x)
-&gt; (forall x. Rep (InstallDirs dir) x -&gt; InstallDirs dir)
-&gt; Generic (InstallDirs dir)
forall x. Rep (InstallDirs dir) x -&gt; InstallDirs dir
forall x. InstallDirs dir -&gt; Rep (InstallDirs dir) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall dir x. Rep (InstallDirs dir) x -&gt; InstallDirs dir
forall dir x. InstallDirs dir -&gt; Rep (InstallDirs dir) x
$cto :: forall dir x. Rep (InstallDirs dir) x -&gt; InstallDirs dir
$cfrom :: forall dir x. InstallDirs dir -&gt; Rep (InstallDirs dir) x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span id="local-6989586621679680649"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679680043"><span id="local-6989586621679680045"><span id="local-6989586621679680047"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680649"><span class="hs-identifier hs-type">dir</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680649"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-105"></span><span id="local-6989586621679680643"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679680035"><span id="local-6989586621679680037"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680643"><span class="hs-identifier hs-type">dir</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680643"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span id="local-6989586621679680641"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679680028"><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680641"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680641"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680641"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-108"></span><span>  </span><span id="local-6989586621679679987"><span class="annot"><span class="annottext">mempty :: InstallDirs dir
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs dir
forall a. (Generic a, GMonoid (Rep a)) =&gt; a
</span><a href="Distribution.Compat.Semigroup.html#gmempty"><span class="hs-identifier hs-var">gmempty</span></a></span><span>
</span><span id="line-109"></span><span>  </span><span id="local-6989586621679679984"><span class="annot"><span class="annottext">mappend :: InstallDirs dir -&gt; InstallDirs dir -&gt; InstallDirs dir
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs dir -&gt; InstallDirs dir -&gt; InstallDirs dir
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span id="local-6989586621679680640"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679979"><span id="local-6989586621679679981"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680640"><span class="hs-identifier hs-type">dir</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680640"><span class="hs-identifier hs-type">dir</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-112"></span><span>  </span><span id="local-6989586621679679938"><span class="annot"><span class="annottext">&lt;&gt; :: InstallDirs dir -&gt; InstallDirs dir -&gt; InstallDirs dir
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs dir -&gt; InstallDirs dir -&gt; InstallDirs dir
forall a. (Generic a, GSemigroup (Rep a)) =&gt; a -&gt; a -&gt; a
</span><a href="Distribution.Compat.Semigroup.html#gmappend"><span class="hs-identifier hs-var">gmappend</span></a></span></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span id="local-6989586621679680616"><span id="local-6989586621679680617"><span id="local-6989586621679680618"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#combineInstallDirs"><span class="hs-identifier hs-type">combineInstallDirs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679680618"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679680617"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679680616"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680618"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-116"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680617"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-117"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680616"><span class="hs-identifier hs-type">c</span></a></span></span></span></span><span>
</span><span id="line-118"></span><span id="combineInstallDirs"><span class="annot"><span class="annottext">combineInstallDirs :: forall a b c.
(a -&gt; b -&gt; c) -&gt; InstallDirs a -&gt; InstallDirs b -&gt; InstallDirs c
</span><a href="Distribution.Simple.InstallDirs.html#combineInstallDirs"><span class="hs-identifier hs-var hs-var">combineInstallDirs</span></a></span></span><span> </span><span id="local-6989586621679679936"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-identifier hs-var">combine</span></a></span></span><span> </span><span id="local-6989586621679679935"><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679679934"><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs :: forall dir.
dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; InstallDirs dir
</span><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-119"></span><span>    </span><span class="annot"><span class="annottext">prefix :: c
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var">prefix</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-120"></span><span>    </span><span class="annot"><span class="annottext">bindir :: c
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var">bindir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-121"></span><span>    </span><span class="annot"><span class="annottext">libdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var">libdir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-122"></span><span>    </span><span class="annot"><span class="annottext">libsubdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var">libsubdir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><span class="annottext">dynlibdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var">dynlibdir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>  </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-124"></span><span>    </span><span class="annot"><span class="annottext">flibdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var">flibdir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var hs-var">flibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>    </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var hs-var">flibdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-125"></span><span>    </span><span class="annot"><span class="annottext">libexecdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var">libexecdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var hs-var">libexecdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var hs-var">libexecdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-126"></span><span>    </span><span class="annot"><span class="annottext">libexecsubdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var">libexecsubdir</span></a></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var hs-var">libexecsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var hs-var">libexecsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-127"></span><span>    </span><span class="annot"><span class="annottext">includedir :: c
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var">includedir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-128"></span><span>    </span><span class="annot"><span class="annottext">datadir :: c
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var">datadir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>    </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-129"></span><span>    </span><span class="annot"><span class="annottext">datasubdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var">datasubdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-130"></span><span>    </span><span class="annot"><span class="annottext">docdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var">docdir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-131"></span><span>    </span><span class="annot"><span class="annottext">mandir :: c
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var">mandir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var hs-var">mandir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>     </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var hs-var">mandir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-132"></span><span>    </span><span class="annot"><span class="annottext">htmldir :: c
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var">htmldir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span>    </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-133"></span><span>    </span><span class="annot"><span class="annottext">haddockdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var">haddockdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var hs-var">haddockdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var hs-var">haddockdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">sysconfdir :: c
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var">sysconfdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var hs-var">sysconfdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679935"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679679936"><span class="hs-operator hs-var">`combine`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b -&gt; b
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var hs-var">sysconfdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs b
</span><a href="#local-6989586621679679934"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span id="local-6989586621679680612"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#appendSubdirs"><span class="hs-identifier hs-type">appendSubdirs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679680612"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679680612"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679680612"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680612"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679680612"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-138"></span><span id="appendSubdirs"><span class="annot"><span class="annottext">appendSubdirs :: forall a. (a -&gt; a -&gt; a) -&gt; InstallDirs a -&gt; InstallDirs a
</span><a href="Distribution.Simple.InstallDirs.html#appendSubdirs"><span class="hs-identifier hs-var hs-var">appendSubdirs</span></a></span></span><span> </span><span id="local-6989586621679679926"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679679926"><span class="hs-identifier hs-var">append</span></a></span></span><span> </span><span id="local-6989586621679679925"><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-139"></span><span>    </span><span class="annot"><span class="annottext">libdir :: a
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var">libdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679679926"><span class="hs-operator hs-var">`append`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-140"></span><span>    </span><span class="annot"><span class="annottext">libexecdir :: a
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var">libexecdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var hs-var">libexecdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679679926"><span class="hs-operator hs-var">`append`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var hs-var">libexecsubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-141"></span><span>    </span><span class="annot"><span class="annottext">datadir :: a
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var">datadir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679679926"><span class="hs-operator hs-var">`append`</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a -&gt; a
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs a
</span><a href="#local-6989586621679679925"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><span class="annottext">libsubdir :: a
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var">libsubdir</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; a
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;internal error InstallDirs.libsubdir&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-143"></span><span>    </span><span class="annot"><span class="annottext">libexecsubdir :: a
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var">libexecsubdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; a
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;internal error InstallDirs.libexecsubdir&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-144"></span><span>    </span><span class="annot"><span class="annottext">datasubdir :: a
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var">datasubdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; a
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;internal error InstallDirs.datasubdir&quot;</span></span><span>
</span><span id="line-145"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="hs-comment">-- | The installation directories in terms of 'PathTemplate's that contain</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- variables.</span><span>
</span><span id="line-149"></span><span class="hs-comment">--</span><span>
</span><span id="line-150"></span><span class="hs-comment">-- The defaults for most of the directories are relative to each other, in</span><span>
</span><span id="line-151"></span><span class="hs-comment">-- particular they are all relative to a single prefix. This makes it</span><span>
</span><span id="line-152"></span><span class="hs-comment">-- convenient for the user to override the default installation directory</span><span>
</span><span id="line-153"></span><span class="hs-comment">-- by only having to specify --prefix=... rather than overriding each</span><span>
</span><span id="line-154"></span><span class="hs-comment">-- individually. This is done by allowing $-style variables in the dirs.</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- These are expanded by textual substitution (see 'substPathTemplate').</span><span>
</span><span id="line-156"></span><span class="hs-comment">--</span><span>
</span><span id="line-157"></span><span class="hs-comment">-- A few of these installation directories are split into two components, the</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- dir and subdir. The full installation path is formed by combining the two</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- together with @\/@. The reason for this is compatibility with other Unix</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- build systems which also support @--libdir@ and @--datadir@. We would like</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- users to be able to configure @--libdir=\/usr\/lib64@ for example but</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- because by default we want to support installing multiple versions of</span><span>
</span><span id="line-163"></span><span class="hs-comment">-- packages and building the same package for multiple compilers we append the</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- libsubdir to get: @\/usr\/lib64\/$libname\/$compiler@.</span><span>
</span><span id="line-165"></span><span class="hs-comment">--</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- An additional complication is the need to support relocatable packages on</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- systems which support such things, like Windows.</span><span>
</span><span id="line-168"></span><span class="hs-comment">--</span><span>
</span><span id="line-169"></span><span class="hs-keyword">type</span><span> </span><span id="InstallDirTemplates"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-var">InstallDirTemplates</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- Default installation directories</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs"><span class="hs-identifier hs-type">defaultInstallDirs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerFlavor"><span class="hs-identifier hs-type">CompilerFlavor</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-type">InstallDirTemplates</span></a></span><span>
</span><span id="line-175"></span><span id="defaultInstallDirs"><span class="annot"><span class="annottext">defaultInstallDirs :: CompilerFlavor -&gt; Bool -&gt; Bool -&gt; IO InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs"><span class="hs-identifier hs-var hs-var">defaultInstallDirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; CompilerFlavor -&gt; Bool -&gt; Bool -&gt; IO InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier hs-var">defaultInstallDirs'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier hs-type">defaultInstallDirs'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">{- use external internal deps -}</span><span>
</span><span id="line-178"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerFlavor"><span class="hs-identifier hs-type">CompilerFlavor</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-type">InstallDirTemplates</span></a></span><span>
</span><span id="line-179"></span><span id="defaultInstallDirs%27"><span class="annot"><span class="annottext">defaultInstallDirs' :: Bool -&gt; CompilerFlavor -&gt; Bool -&gt; Bool -&gt; IO InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier hs-var hs-var">defaultInstallDirs'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span id="local-6989586621679679923"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679923"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679679922"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679922"><span class="hs-identifier hs-var">userInstall</span></a></span></span><span> </span><span id="local-6989586621679679921"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679921"><span class="hs-identifier hs-var">hasLibs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-180"></span><span>  </span><span id="local-6989586621679679920"><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679920"><span class="hs-identifier hs-var">dflt</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; CompilerFlavor -&gt; Bool -&gt; Bool -&gt; IO InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier hs-var">defaultInstallDirs'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679923"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679922"><span class="hs-identifier hs-var">userInstall</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679921"><span class="hs-identifier hs-var">hasLibs</span></a></span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-comment">-- Be a bit more hermetic about per-component installs</span><span>
</span><span id="line-182"></span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; IO InstallDirTemplates
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679920"><span class="hs-identifier hs-var">dflt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">datasubdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var">datasubdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var">toPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathTemplate) -&gt; FilePath -&gt; PathTemplate
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libname&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-183"></span><span>                </span><span class="annot"><span class="annottext">docdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var">docdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var">toPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathTemplate) -&gt; FilePath -&gt; PathTemplate
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$datadir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;doc&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libname&quot;</span></span><span>
</span><span id="line-184"></span><span>              </span><span class="hs-special">}</span><span>
</span><span id="line-185"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#defaultInstallDirs%27"><span class="hs-identifier hs-var">defaultInstallDirs'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span id="local-6989586621679679919"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679919"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679679918"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679918"><span class="hs-identifier hs-var">userInstall</span></a></span></span><span> </span><span id="local-6989586621679679917"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679917"><span class="hs-identifier hs-var">_hasLibs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-186"></span><span>  </span><span id="local-6989586621679679916"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679916"><span class="hs-identifier hs-var">installPrefix</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-187"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679679918"><span class="hs-identifier hs-var">userInstall</span></a></span><span>
</span><span id="line-188"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-189"></span><span>        </span><span id="local-6989586621679679915"><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621679679915"><span class="hs-identifier hs-var">mDir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO (Maybe FilePath)
</span><a href="../../base/src/System.Environment.html#lookupEnv"><span class="hs-identifier hs-var">lookupEnv</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;CABAL_DIR&quot;</span></span><span>
</span><span id="line-190"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621679679915"><span class="hs-identifier hs-var">mDir</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-191"></span><span>          </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
</span><a href="../../directory/src/System.Directory.html#getAppUserDataDirectory"><span class="hs-identifier hs-var">getAppUserDataDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;cabal&quot;</span></span><span>
</span><span id="line-192"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679679914"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679914"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679914"><span class="hs-identifier hs-var">dir</span></a></span><span>
</span><span id="line-193"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-194"></span><span>           </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679679911"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679911"><span class="hs-identifier hs-var">windowsProgramFilesDir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO FilePath
</span><a href="Distribution.Simple.InstallDirs.html#getWindowsProgramFilesDir"><span class="hs-identifier hs-var">getWindowsProgramFilesDir</span></a></span><span>
</span><span id="line-195"></span><span>                         </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679911"><span class="hs-identifier hs-var">windowsProgramFilesDir</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Haskell&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>           </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;/usr/local&quot;</span></span><span>
</span><span id="line-197"></span><span>  </span><span id="local-6989586621679679909"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679909"><span class="hs-identifier hs-var">installLibDir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-198"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-199"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span>
</span><span id="line-200"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;lib&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; IO InstallDirTemplates
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; IO InstallDirTemplates)
-&gt; InstallDirTemplates -&gt; IO InstallDirTemplates
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathTemplate)
-&gt; InstallDirs FilePath -&gt; InstallDirTemplates
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var">toPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(InstallDirs FilePath -&gt; InstallDirTemplates)
-&gt; InstallDirs FilePath -&gt; InstallDirTemplates
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirs :: forall dir.
dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; InstallDirs dir
</span><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-202"></span><span>      </span><span class="annot"><span class="annottext">prefix :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var">prefix</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679916"><span class="hs-identifier hs-var">installPrefix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-203"></span><span>      </span><span class="annot"><span class="annottext">bindir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var">bindir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;bin&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-204"></span><span>      </span><span class="annot"><span class="annottext">libdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var">libdir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679909"><span class="hs-identifier hs-var">installLibDir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-205"></span><span>      </span><span class="annot"><span class="annottext">libsubdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var">libsubdir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679919"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-206"></span><span>           </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$pkgid&quot;</span></span><span>
</span><span id="line-207"></span><span>           </span><span id="local-6989586621679679907"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679907"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libname&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-208"></span><span>      </span><span class="annot"><span class="annottext">dynlibdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var">dynlibdir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libdir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679919"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-209"></span><span>           </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#UHC"><span class="hs-identifier hs-var">UHC</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$pkgid&quot;</span></span><span>
</span><span id="line-210"></span><span>           </span><span id="local-6989586621679679906"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679679906"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-211"></span><span>      </span><span class="annot"><span class="annottext">libexecsubdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var">libexecsubdir</span></a></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$pkgid&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-212"></span><span>      </span><span class="annot"><span class="annottext">flibdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var">flibdir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libdir&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-213"></span><span>      </span><span class="annot"><span class="annottext">libexecdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var">libexecdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-214"></span><span>        </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libname&quot;</span></span><span>
</span><span id="line-215"></span><span>        </span><span id="local-6989586621679679905"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679905"><span class="hs-identifier hs-var">_other</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;libexec&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-216"></span><span>      </span><span class="annot"><span class="annottext">includedir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var">includedir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libdir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$libsubdir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;include&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-217"></span><span>      </span><span class="annot"><span class="annottext">datadir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var">datadir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#buildOS"><span class="hs-identifier hs-var">buildOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-218"></span><span>        </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span>
</span><span id="line-219"></span><span>        </span><span id="local-6989586621679679904"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679904"><span class="hs-identifier hs-var">_other</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;share&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-220"></span><span>      </span><span class="annot"><span class="annottext">datasubdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var">datasubdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$pkgid&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-221"></span><span>      </span><span class="annot"><span class="annottext">docdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var">docdir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$datadir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;doc&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$abi&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$pkgid&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-222"></span><span>      </span><span class="annot"><span class="annottext">mandir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var">mandir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$datadir&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;man&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-223"></span><span>      </span><span class="annot"><span class="annottext">htmldir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var">htmldir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$docdir&quot;</span></span><span>  </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;html&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-224"></span><span>      </span><span class="annot"><span class="annottext">haddockdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var">haddockdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$htmldir&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-225"></span><span>      </span><span class="annot"><span class="annottext">sysconfdir :: FilePath
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var">sysconfdir</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;$prefix&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;etc&quot;</span></span><span>
</span><span id="line-226"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- Converting directories, absolute or prefix-relative</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="hs-comment">-- | Substitute the install dir templates into each other.</span><span>
</span><span id="line-232"></span><span class="hs-comment">--</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- To prevent cyclic substitutions, only some variables are allowed in</span><span>
</span><span id="line-234"></span><span class="hs-comment">-- particular dir templates. If out of scope vars are present, they are not</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- substituted for. Checking for any remaining unsubstituted vars can be done</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- as a subsequent operation.</span><span>
</span><span id="line-237"></span><span class="hs-comment">--</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- The reason it is done this way is so that in 'prefixRelativeInstallDirs' we</span><span>
</span><span id="line-239"></span><span class="hs-comment">-- can replace 'prefix' with the 'PrefixVar' and get resulting</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- 'PathTemplate's that still have the 'PrefixVar' in them. Doing this makes it</span><span>
</span><span id="line-241"></span><span class="hs-comment">-- each to check which paths are relative to the $prefix.</span><span>
</span><span id="line-242"></span><span class="hs-comment">--</span><span>
</span><span id="line-243"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#substituteInstallDirTemplates"><span class="hs-identifier hs-type">substituteInstallDirTemplates</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-244"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-type">InstallDirTemplates</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-type">InstallDirTemplates</span></a></span><span>
</span><span id="line-245"></span><span id="substituteInstallDirTemplates"><span class="annot"><span class="annottext">substituteInstallDirTemplates :: PathTemplateEnv -&gt; InstallDirTemplates -&gt; InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#substituteInstallDirTemplates"><span class="hs-identifier hs-var hs-var">substituteInstallDirTemplates</span></a></span></span><span> </span><span id="local-6989586621679679903"><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679903"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621679679902"><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679902"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span>
</span><span id="line-246"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-247"></span><span>    </span><span id="local-6989586621679679901"><span class="annot"><span class="annottext">dirs' :: InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var hs-var">dirs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstallDirs :: forall dir.
dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; dir
-&gt; InstallDirs dir
</span><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-248"></span><span>      </span><span class="hs-comment">-- So this specifies exactly which vars are allowed in each template</span><span>
</span><span id="line-249"></span><span>      </span><span class="annot"><span class="annottext">prefix :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var">prefix</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span><span>     </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-250"></span><span>      </span><span class="annot"><span class="annottext">bindir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var">bindir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span><span>     </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var">prefixVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-251"></span><span>      </span><span class="annot"><span class="annottext">libdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var">libdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span>     </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var">prefixVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679898"><span class="hs-identifier hs-var">bindirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-252"></span><span>      </span><span class="annot"><span class="annottext">libsubdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var">libsubdir</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-253"></span><span>      </span><span class="annot"><span class="annottext">dynlibdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var">dynlibdir</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span>  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var">prefixVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679898"><span class="hs-identifier hs-var">bindirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679897"><span class="hs-identifier hs-var">libdirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-254"></span><span>      </span><span class="annot"><span class="annottext">flibdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var">flibdir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#flibdir"><span class="hs-identifier hs-var hs-var">flibdir</span></a></span><span>    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var">prefixVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679898"><span class="hs-identifier hs-var">bindirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679897"><span class="hs-identifier hs-var">libdirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-255"></span><span>      </span><span class="annot"><span class="annottext">libexecdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var">libexecdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecdir"><span class="hs-identifier hs-var hs-var">libexecdir</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var">prefixBinLibVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-256"></span><span>      </span><span class="annot"><span class="annottext">libexecsubdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var">libexecsubdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libexecsubdir"><span class="hs-identifier hs-var hs-var">libexecsubdir</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-257"></span><span>      </span><span class="annot"><span class="annottext">includedir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var">includedir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#includedir"><span class="hs-identifier hs-var hs-var">includedir</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var">prefixBinLibVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-258"></span><span>      </span><span class="annot"><span class="annottext">datadir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var">datadir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span>    </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var">prefixBinLibVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-259"></span><span>      </span><span class="annot"><span class="annottext">datasubdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var">datasubdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-260"></span><span>      </span><span class="annot"><span class="annottext">docdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var">docdir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span><span>     </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679895"><span class="hs-identifier hs-var">prefixBinLibDataVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-261"></span><span>      </span><span class="annot"><span class="annottext">mandir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var">mandir</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#mandir"><span class="hs-identifier hs-var hs-var">mandir</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679895"><span class="hs-identifier hs-var">prefixBinLibDataVars</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679894"><span class="hs-identifier hs-var">docdirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-262"></span><span>      </span><span class="annot"><span class="annottext">htmldir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var">htmldir</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679895"><span class="hs-identifier hs-var">prefixBinLibDataVars</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679894"><span class="hs-identifier hs-var">docdirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-263"></span><span>      </span><span class="annot"><span class="annottext">haddockdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var">haddockdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#haddockdir"><span class="hs-identifier hs-var hs-var">haddockdir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679895"><span class="hs-identifier hs-var">prefixBinLibDataVars</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-264"></span><span>                                      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679894"><span class="hs-identifier hs-var">docdirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679893"><span class="hs-identifier hs-var">htmldirVar</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-265"></span><span>      </span><span class="annot"><span class="annottext">sysconfdir :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var">sysconfdir</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#sysconfdir"><span class="hs-identifier hs-var hs-var">sysconfdir</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var">prefixBinLibVars</span></a></span><span>
</span><span id="line-266"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-267"></span><span>    </span><span id="local-6989586621679679900"><span class="annot"><span class="annottext">subst :: (InstallDirTemplates -&gt; PathTemplate)
-&gt; PathTemplateEnv -&gt; PathTemplate
</span><a href="#local-6989586621679679900"><span class="hs-identifier hs-var hs-var">subst</span></a></span></span><span> </span><span id="local-6989586621679679892"><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
</span><a href="#local-6989586621679679892"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679679891"><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679891"><span class="hs-identifier hs-var">env'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier hs-var">substPathTemplate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679891"><span class="hs-identifier hs-var">env'</span></a></span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679903"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
</span><a href="#local-6989586621679679892"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679902"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span>    </span><span id="local-6989586621679679899"><span class="annot"><span class="annottext">prefixVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var hs-var">prefixVar</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PrefixVar"><span class="hs-identifier hs-var">PrefixVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>    </span><span id="local-6989586621679679898"><span class="annot"><span class="annottext">bindirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679898"><span class="hs-identifier hs-var hs-var">bindirVar</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#BindirVar"><span class="hs-identifier hs-var">BindirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>    </span><span id="local-6989586621679679897"><span class="annot"><span class="annottext">libdirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679897"><span class="hs-identifier hs-var hs-var">libdirVar</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#LibdirVar"><span class="hs-identifier hs-var">LibdirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>    </span><span id="local-6989586621679679887"><span class="annot"><span class="annottext">libsubdirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679887"><span class="hs-identifier hs-var hs-var">libsubdirVar</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#LibsubdirVar"><span class="hs-identifier hs-var">LibsubdirVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span>    </span><span id="local-6989586621679679885"><span class="annot"><span class="annottext">datadirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679885"><span class="hs-identifier hs-var hs-var">datadirVar</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DatadirVar"><span class="hs-identifier hs-var">DatadirVar</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>    </span><span id="local-6989586621679679883"><span class="annot"><span class="annottext">datasubdirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679883"><span class="hs-identifier hs-var hs-var">datasubdirVar</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DatasubdirVar"><span class="hs-identifier hs-var">DatasubdirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>    </span><span id="local-6989586621679679894"><span class="annot"><span class="annottext">docdirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679894"><span class="hs-identifier hs-var hs-var">docdirVar</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DocdirVar"><span class="hs-identifier hs-var">DocdirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>    </span><span id="local-6989586621679679893"><span class="annot"><span class="annottext">htmldirVar :: (PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679893"><span class="hs-identifier hs-var hs-var">htmldirVar</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#HtmldirVar"><span class="hs-identifier hs-var">HtmldirVar</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679901"><span class="hs-identifier hs-var">dirs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621679679896"><span class="annot"><span class="annottext">prefixBinLibVars :: PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var hs-var">prefixBinLibVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679899"><span class="hs-identifier hs-var">prefixVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679898"><span class="hs-identifier hs-var">bindirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679897"><span class="hs-identifier hs-var">libdirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679887"><span class="hs-identifier hs-var">libsubdirVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-278"></span><span>    </span><span id="local-6989586621679679895"><span class="annot"><span class="annottext">prefixBinLibDataVars :: PathTemplateEnv
</span><a href="#local-6989586621679679895"><span class="hs-identifier hs-var hs-var">prefixBinLibDataVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679896"><span class="hs-identifier hs-var">prefixBinLibVars</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679885"><span class="hs-identifier hs-var">datadirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(PathTemplateVariable, PathTemplate)
</span><a href="#local-6989586621679679883"><span class="hs-identifier hs-var">datasubdirVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span class="hs-comment">-- | Convert from abstract install directories to actual absolute ones by</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- substituting for all the variables in the abstract paths, to get real</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- absolute path.</span><span>
</span><span id="line-283"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#absoluteInstallDirs"><span class="hs-identifier hs-type">absoluteInstallDirs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span>
</span><span id="line-284"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html#UnitId"><span class="hs-identifier hs-type">UnitId</span></a></span><span>
</span><span id="line-285"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>
</span><span id="line-286"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyDest"><span class="hs-identifier hs-type">CopyDest</span></a></span><span>
</span><span id="line-287"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-288"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-289"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-290"></span><span id="absoluteInstallDirs"><span class="annot"><span class="annottext">absoluteInstallDirs :: PackageIdentifier
-&gt; UnitId
-&gt; CompilerInfo
-&gt; CopyDest
-&gt; Platform
-&gt; InstallDirTemplates
-&gt; InstallDirs FilePath
</span><a href="Distribution.Simple.InstallDirs.html#absoluteInstallDirs"><span class="hs-identifier hs-var hs-var">absoluteInstallDirs</span></a></span></span><span> </span><span id="local-6989586621679679879"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679879"><span class="hs-identifier hs-var">pkgId</span></a></span></span><span> </span><span id="local-6989586621679679878"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679878"><span class="hs-identifier hs-var">libname</span></a></span></span><span> </span><span id="local-6989586621679679877"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679877"><span class="hs-identifier hs-var">compilerId</span></a></span></span><span> </span><span id="local-6989586621679679876"><span class="annot"><span class="annottext">CopyDest
</span><a href="#local-6989586621679679876"><span class="hs-identifier hs-var">copydest</span></a></span></span><span> </span><span id="local-6989586621679679875"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679875"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679679874"><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679874"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-291"></span><span>    </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CopyDest
</span><a href="#local-6989586621679679876"><span class="hs-identifier hs-var">copydest</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-292"></span><span>       </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyTo"><span class="hs-identifier hs-type">CopyTo</span></a></span><span> </span><span id="local-6989586621679679872"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679872"><span class="hs-identifier hs-var">destdir</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; InstallDirs FilePath -&gt; InstallDirs FilePath
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679872"><span class="hs-identifier hs-var">destdir</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#dropDrive"><span class="hs-identifier hs-var">dropDrive</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span>       </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyToDb"><span class="hs-identifier hs-type">CopyToDb</span></a></span><span> </span><span id="local-6989586621679679869"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679869"><span class="hs-identifier hs-var">dbdir</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; InstallDirs FilePath -&gt; InstallDirs FilePath
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; ShowS
forall {a}. Eq a =&gt; [a] -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679679868"><span class="hs-identifier hs-var">substPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;${pkgroot}&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679869"><span class="hs-identifier hs-var">dbdir</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-294"></span><span>       </span><span class="annot"><span class="annottext">CopyDest
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstallDirs FilePath -&gt; InstallDirs FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>  </span><span class="annot"><span class="annottext">(InstallDirs FilePath -&gt; InstallDirs FilePath)
-&gt; (InstallDirTemplates -&gt; InstallDirs FilePath)
-&gt; InstallDirTemplates
-&gt; InstallDirs FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; ShowS) -&gt; InstallDirs FilePath -&gt; InstallDirs FilePath
forall a. (a -&gt; a -&gt; a) -&gt; InstallDirs a -&gt; InstallDirs a
</span><a href="Distribution.Simple.InstallDirs.html#appendSubdirs"><span class="hs-identifier hs-var">appendSubdirs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">(&lt;/&gt;)</span></a></span><span>
</span><span id="line-296"></span><span>  </span><span class="annot"><span class="annottext">(InstallDirs FilePath -&gt; InstallDirs FilePath)
-&gt; (InstallDirTemplates -&gt; InstallDirs FilePath)
-&gt; InstallDirTemplates
-&gt; InstallDirs FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(PathTemplate -&gt; FilePath)
-&gt; InstallDirTemplates -&gt; InstallDirs FilePath
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplate -&gt; FilePath
</span><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-var">fromPathTemplate</span></a></span><span>
</span><span id="line-297"></span><span>  </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; InstallDirs FilePath)
-&gt; InstallDirTemplates -&gt; InstallDirs FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; InstallDirTemplates -&gt; InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#substituteInstallDirTemplates"><span class="hs-identifier hs-var">substituteInstallDirTemplates</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679866"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679874"><span class="hs-identifier hs-var">dirs</span></a></span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-299"></span><span>    </span><span id="local-6989586621679679866"><span class="annot"><span class="annottext">env :: PathTemplateEnv
</span><a href="#local-6989586621679679866"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
-&gt; UnitId -&gt; CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier hs-var">initialPathTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679879"><span class="hs-identifier hs-var">pkgId</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679878"><span class="hs-identifier hs-var">libname</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679877"><span class="hs-identifier hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679875"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-300"></span><span>    </span><span id="local-6989586621679679868"><span class="annot"><span class="annottext">substPrefix :: [a] -&gt; [a] -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679679868"><span class="hs-identifier hs-var hs-var">substPrefix</span></a></span></span><span> </span><span id="local-6989586621679679862"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679862"><span class="hs-identifier hs-var">pre</span></a></span></span><span> </span><span id="local-6989586621679679861"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679861"><span class="hs-identifier hs-var">root</span></a></span></span><span> </span><span id="local-6989586621679679860"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679860"><span class="hs-identifier hs-var">path</span></a></span></span><span>
</span><span id="line-301"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679862"><span class="hs-identifier hs-var">pre</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679860"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679861"><span class="hs-identifier hs-var">root</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; [a]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679862"><span class="hs-identifier hs-var">pre</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679860"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-302"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679679860"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="hs-comment">-- |The location prefix for the /copy/ command.</span><span>
</span><span id="line-306"></span><span id="local-6989586621679679855"><span id="local-6989586621679679856"></span></span><span class="hs-keyword">data</span><span> </span><span id="CopyDest"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyDest"><span class="hs-identifier hs-var">CopyDest</span></a></span></span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NoCopyDest"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#NoCopyDest"><span class="hs-identifier hs-var">NoCopyDest</span></a></span></span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CopyTo"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyTo"><span class="hs-identifier hs-var">CopyTo</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-309"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CopyToDb"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyToDb"><span class="hs-identifier hs-var">CopyToDb</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-comment">-- ^ when using the ${pkgroot} as prefix. The CopyToDb will</span><span>
</span><span id="line-311"></span><span>  </span><span class="hs-comment">--   adjust the paths to be relative to the provided package</span><span>
</span><span id="line-312"></span><span>  </span><span class="hs-comment">--   database when copying / installing.</span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679679847"><span id="local-6989586621679679852"><span class="annot"><span class="annottext">CopyDest -&gt; CopyDest -&gt; Bool
(CopyDest -&gt; CopyDest -&gt; Bool)
-&gt; (CopyDest -&gt; CopyDest -&gt; Bool) -&gt; Eq CopyDest
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: CopyDest -&gt; CopyDest -&gt; Bool
$c/= :: CopyDest -&gt; CopyDest -&gt; Bool
== :: CopyDest -&gt; CopyDest -&gt; Bool
$c== :: CopyDest -&gt; CopyDest -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679679837"><span id="local-6989586621679679839"><span id="local-6989586621679679845"><span class="annot"><span class="annottext">Int -&gt; CopyDest -&gt; ShowS
[CopyDest] -&gt; ShowS
CopyDest -&gt; FilePath
(Int -&gt; CopyDest -&gt; ShowS)
-&gt; (CopyDest -&gt; FilePath) -&gt; ([CopyDest] -&gt; ShowS) -&gt; Show CopyDest
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [CopyDest] -&gt; ShowS
$cshowList :: [CopyDest] -&gt; ShowS
show :: CopyDest -&gt; FilePath
$cshow :: CopyDest -&gt; FilePath
showsPrec :: Int -&gt; CopyDest -&gt; ShowS
$cshowsPrec :: Int -&gt; CopyDest -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. CopyDest -&gt; Rep CopyDest x)
-&gt; (forall x. Rep CopyDest x -&gt; CopyDest) -&gt; Generic CopyDest
forall x. Rep CopyDest x -&gt; CopyDest
forall x. CopyDest -&gt; Rep CopyDest x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep CopyDest x -&gt; CopyDest
$cfrom :: forall x. CopyDest -&gt; Rep CopyDest x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679829"><span id="local-6989586621679679831"><span id="local-6989586621679679833"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#CopyDest"><span class="hs-identifier hs-type">CopyDest</span></a></span></span></span></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="hs-comment">-- | Check which of the paths are relative to the installation $prefix.</span><span>
</span><span id="line-318"></span><span class="hs-comment">--</span><span>
</span><span id="line-319"></span><span class="hs-comment">-- If any of the paths are not relative, ie they are absolute paths, then it</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- prevents us from making a relocatable package (also known as a \&quot;prefix</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- independent\&quot; package).</span><span>
</span><span id="line-322"></span><span class="hs-comment">--</span><span>
</span><span id="line-323"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#prefixRelativeInstallDirs"><span class="hs-identifier hs-type">prefixRelativeInstallDirs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span>
</span><span id="line-324"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html#UnitId"><span class="hs-identifier hs-type">UnitId</span></a></span><span>
</span><span id="line-325"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>
</span><span id="line-326"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-327"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirTemplates"><span class="hs-identifier hs-type">InstallDirTemplates</span></a></span><span>
</span><span id="line-328"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-329"></span><span id="prefixRelativeInstallDirs"><span class="annot"><span class="annottext">prefixRelativeInstallDirs :: PackageIdentifier
-&gt; UnitId
-&gt; CompilerInfo
-&gt; Platform
-&gt; InstallDirTemplates
-&gt; InstallDirs (Maybe FilePath)
</span><a href="Distribution.Simple.InstallDirs.html#prefixRelativeInstallDirs"><span class="hs-identifier hs-var hs-var">prefixRelativeInstallDirs</span></a></span></span><span> </span><span id="local-6989586621679679828"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679828"><span class="hs-identifier hs-var">pkgId</span></a></span></span><span> </span><span id="local-6989586621679679827"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679827"><span class="hs-identifier hs-var">libname</span></a></span></span><span> </span><span id="local-6989586621679679826"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679826"><span class="hs-identifier hs-var">compilerId</span></a></span></span><span> </span><span id="local-6989586621679679825"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679825"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679679824"><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679824"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-330"></span><span>    </span><span class="annot"><span class="annottext">(PathTemplate -&gt; Maybe FilePath)
-&gt; InstallDirTemplates -&gt; InstallDirs (Maybe FilePath)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplate -&gt; Maybe FilePath
</span><a href="#local-6989586621679679823"><span class="hs-identifier hs-var">relative</span></a></span><span>
</span><span id="line-331"></span><span>  </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; InstallDirs (Maybe FilePath))
-&gt; (InstallDirTemplates -&gt; InstallDirTemplates)
-&gt; InstallDirTemplates
-&gt; InstallDirs (Maybe FilePath)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(PathTemplate -&gt; PathTemplate -&gt; PathTemplate)
-&gt; InstallDirTemplates -&gt; InstallDirTemplates
forall a. (a -&gt; a -&gt; a) -&gt; InstallDirs a -&gt; InstallDirs a
</span><a href="Distribution.Simple.InstallDirs.html#appendSubdirs"><span class="hs-identifier hs-var">appendSubdirs</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplate -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#combinePathTemplate"><span class="hs-identifier hs-var">combinePathTemplate</span></a></span><span>
</span><span id="line-332"></span><span>  </span><span class="annot"><span class="annottext">(InstallDirTemplates -&gt; InstallDirs (Maybe FilePath))
-&gt; InstallDirTemplates -&gt; InstallDirs (Maybe FilePath)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-comment">-- substitute the path template into each other, except that we map</span><span>
</span><span id="line-333"></span><span>    </span><span class="hs-comment">-- \$prefix back to $prefix. We're trying to end up with templates that</span><span>
</span><span id="line-334"></span><span>    </span><span class="hs-comment">-- mention no vars except $prefix.</span><span>
</span><span id="line-335"></span><span>    </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; InstallDirTemplates -&gt; InstallDirTemplates
</span><a href="Distribution.Simple.InstallDirs.html#substituteInstallDirTemplates"><span class="hs-identifier hs-var">substituteInstallDirTemplates</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679822"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679824"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-336"></span><span>      </span><span class="annot"><span class="annottext">prefix :: PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var">prefix</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PathTemplateVariable -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Variable"><span class="hs-identifier hs-var">Variable</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PrefixVar"><span class="hs-identifier hs-var">PrefixVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-337"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-338"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-339"></span><span>    </span><span id="local-6989586621679679822"><span class="annot"><span class="annottext">env :: PathTemplateEnv
</span><a href="#local-6989586621679679822"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
-&gt; UnitId -&gt; CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier hs-var">initialPathTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679828"><span class="hs-identifier hs-var">pkgId</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679827"><span class="hs-identifier hs-var">libname</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679826"><span class="hs-identifier hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679825"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span>    </span><span class="hs-comment">-- If it starts with $prefix then it's relative and produce the relative</span><span>
</span><span id="line-342"></span><span>    </span><span class="hs-comment">-- path by stripping off $prefix/ or $prefix</span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621679679823"><span class="annot"><span class="annottext">relative :: PathTemplate -&gt; Maybe FilePath
</span><a href="#local-6989586621679679823"><span class="hs-identifier hs-var hs-var">relative</span></a></span></span><span> </span><span id="local-6989586621679679817"><span class="annot"><span class="annottext">PathTemplate
</span><a href="#local-6989586621679679817"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PathTemplate
</span><a href="#local-6989586621679679817"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-344"></span><span>      </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679816"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679816"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([PathComponent] -&gt; FilePath)
-&gt; Maybe [PathComponent] -&gt; Maybe FilePath
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplate -&gt; FilePath
</span><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-var">fromPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(PathTemplate -&gt; FilePath)
-&gt; ([PathComponent] -&gt; PathTemplate) -&gt; [PathComponent] -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[PathComponent] -&gt; Maybe [PathComponent]
</span><a href="#local-6989586621679679815"><span class="hs-identifier hs-var">relative'</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679816"><span class="hs-identifier hs-var">cs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-345"></span><span>    </span><span id="local-6989586621679679815"><span class="annot"><span class="annottext">relative' :: [PathComponent] -&gt; Maybe [PathComponent]
</span><a href="#local-6989586621679679815"><span class="hs-identifier hs-var hs-var">relative'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#Variable"><span class="hs-identifier hs-type">Variable</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PrefixVar"><span class="hs-identifier hs-var">PrefixVar</span></a></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-type">Ordinary</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679679813"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679679813"><span class="hs-identifier hs-var">s</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679679812"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679812"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679679811"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679811"><span class="hs-identifier hs-var">rest'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-346"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#isPathSeparator"><span class="hs-identifier hs-var">isPathSeparator</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679679813"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; Maybe [PathComponent]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679812"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">PathComponent -&gt; [PathComponent] -&gt; [PathComponent]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679811"><span class="hs-identifier hs-var">rest'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-347"></span><span>    </span><span class="annot"><a href="#local-6989586621679679815"><span class="hs-identifier hs-var">relative'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#Variable"><span class="hs-identifier hs-type">Variable</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PrefixVar"><span class="hs-identifier hs-var">PrefixVar</span></a></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679679810"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679810"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; Maybe [PathComponent]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679810"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-348"></span><span>    </span><span class="annot"><a href="#local-6989586621679679815"><span class="hs-identifier hs-var">relative'</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><span class="hs-identifier">_</span></span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [PathComponent]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- Path templates</span><span>
</span><span id="line-352"></span><span>
</span><span id="line-353"></span><span class="hs-comment">-- | An abstract path, possibly containing variables that need to be</span><span>
</span><span id="line-354"></span><span class="hs-comment">-- substituted for to get a real 'FilePath'.</span><span>
</span><span id="line-355"></span><span class="hs-comment">--</span><span>
</span><span id="line-356"></span><span id="local-6989586621679679808"><span id="local-6989586621679679809"></span></span><span class="hs-keyword">newtype</span><span> </span><span id="PathTemplate"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PathTemplate"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#PathComponent"><span class="hs-identifier hs-type">PathComponent</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-357"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679679801"><span id="local-6989586621679679806"><span class="annot"><span class="annottext">PathTemplate -&gt; PathTemplate -&gt; Bool
(PathTemplate -&gt; PathTemplate -&gt; Bool)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Bool) -&gt; Eq PathTemplate
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c/= :: PathTemplate -&gt; PathTemplate -&gt; Bool
== :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c== :: PathTemplate -&gt; PathTemplate -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679679761"><span id="local-6989586621679679766"><span id="local-6989586621679679771"><span id="local-6989586621679679776"><span id="local-6989586621679679781"><span id="local-6989586621679679786"><span id="local-6989586621679679792"><span class="annot"><span class="annottext">Eq PathTemplate
Eq PathTemplate
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Ordering)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Bool)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Bool)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Bool)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; Bool)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; PathTemplate)
-&gt; (PathTemplate -&gt; PathTemplate -&gt; PathTemplate)
-&gt; Ord PathTemplate
PathTemplate -&gt; PathTemplate -&gt; Bool
PathTemplate -&gt; PathTemplate -&gt; Ordering
PathTemplate -&gt; PathTemplate -&gt; PathTemplate
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: PathTemplate -&gt; PathTemplate -&gt; PathTemplate
$cmin :: PathTemplate -&gt; PathTemplate -&gt; PathTemplate
max :: PathTemplate -&gt; PathTemplate -&gt; PathTemplate
$cmax :: PathTemplate -&gt; PathTemplate -&gt; PathTemplate
&gt;= :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c&gt;= :: PathTemplate -&gt; PathTemplate -&gt; Bool
&gt; :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c&gt; :: PathTemplate -&gt; PathTemplate -&gt; Bool
&lt;= :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c&lt;= :: PathTemplate -&gt; PathTemplate -&gt; Bool
&lt; :: PathTemplate -&gt; PathTemplate -&gt; Bool
$c&lt; :: PathTemplate -&gt; PathTemplate -&gt; Bool
compare :: PathTemplate -&gt; PathTemplate -&gt; Ordering
$ccompare :: PathTemplate -&gt; PathTemplate -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. PathTemplate -&gt; Rep PathTemplate x)
-&gt; (forall x. Rep PathTemplate x -&gt; PathTemplate)
-&gt; Generic PathTemplate
forall x. Rep PathTemplate x -&gt; PathTemplate
forall x. PathTemplate -&gt; Rep PathTemplate x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep PathTemplate x -&gt; PathTemplate
$cfrom :: forall x. PathTemplate -&gt; Rep PathTemplate x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679747"><span id="local-6989586621679679749"><span id="local-6989586621679679751"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span></span></span></span><span>
</span><span id="line-360"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679741"><span id="local-6989586621679679743"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span></span></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span class="hs-keyword">type</span><span> </span><span id="PathTemplateEnv"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-var">PathTemplateEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#PathTemplateVariable"><span class="hs-identifier hs-type">PathTemplateVariable</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span class="hs-comment">-- | Convert a 'FilePath' to a 'PathTemplate' including any template vars.</span><span>
</span><span id="line-365"></span><span class="hs-comment">--</span><span>
</span><span id="line-366"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-type">toPathTemplate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-367"></span><span id="toPathTemplate"><span class="annot"><span class="annottext">toPathTemplate :: FilePath -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var hs-var">toPathTemplate</span></a></span></span><span> </span><span id="local-6989586621679679740"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679740"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span>
</span><span id="line-368"></span><span>    </span><span class="annot"><span class="annottext">([PathComponent] -&gt; PathTemplate)
-&gt; (FilePath -&gt; [PathComponent]) -&gt; FilePath -&gt; PathTemplate
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; Maybe [PathComponent] -&gt; [PathComponent]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [PathComponent]
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; [PathComponent]) -&gt; FilePath -&gt; [PathComponent]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;panic! toPathTemplate &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. Show a =&gt; a -&gt; FilePath
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679740"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-369"></span><span>    </span><span class="annot"><span class="annottext">(Maybe [PathComponent] -&gt; [PathComponent])
-&gt; (FilePath -&gt; Maybe [PathComponent])
-&gt; FilePath
-&gt; [PathComponent]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Maybe [PathComponent]
forall a. Read a =&gt; FilePath -&gt; Maybe a
</span><a href="../../base/src/Text.Read.html#readMaybe"><span class="hs-identifier hs-var">readMaybe</span></a></span><span> </span><span class="hs-comment">-- TODO: eradicateNoParse</span><span>
</span><span id="line-370"></span><span>    </span><span class="annot"><span class="annottext">(FilePath -&gt; PathTemplate) -&gt; FilePath -&gt; PathTemplate
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679740"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span class="hs-comment">-- | Convert back to a path, any remaining vars are included</span><span>
</span><span id="line-373"></span><span class="hs-comment">--</span><span>
</span><span id="line-374"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-type">fromPathTemplate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-375"></span><span id="fromPathTemplate"><span class="annot"><span class="annottext">fromPathTemplate :: PathTemplate -&gt; FilePath
</span><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-var hs-var">fromPathTemplate</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679736"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679736"><span class="hs-identifier hs-var">template</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; FilePath
forall a. Show a =&gt; a -&gt; FilePath
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679736"><span class="hs-identifier hs-var">template</span></a></span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#combinePathTemplate"><span class="hs-identifier hs-type">combinePathTemplate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-378"></span><span id="combinePathTemplate"><span class="annot"><span class="annottext">combinePathTemplate :: PathTemplate -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#combinePathTemplate"><span class="hs-identifier hs-var hs-var">combinePathTemplate</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679735"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679735"><span class="hs-identifier hs-var">t1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679734"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679734"><span class="hs-identifier hs-var">t2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-379"></span><span>  </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679735"><span class="hs-identifier hs-var">t1</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; [PathComponent] -&gt; [PathComponent]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="../../filepath/src/System.FilePath.Windows.html#pathSeparator"><span class="hs-identifier hs-var">pathSeparator</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; [PathComponent] -&gt; [PathComponent]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679734"><span class="hs-identifier hs-var">t2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>
</span><span id="line-381"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier hs-type">substPathTemplate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-382"></span><span id="substPathTemplate"><span class="annot"><span class="annottext">substPathTemplate :: PathTemplateEnv -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier hs-var hs-var">substPathTemplate</span></a></span></span><span> </span><span id="local-6989586621679679733"><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679733"><span class="hs-identifier hs-var">environment</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679732"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679732"><span class="hs-identifier hs-var">template</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-383"></span><span>    </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(PathComponent -&gt; [PathComponent])
-&gt; [PathComponent] -&gt; [PathComponent]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">PathComponent -&gt; [PathComponent]
</span><a href="#local-6989586621679679730"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679732"><span class="hs-identifier hs-var">template</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679679730"><span class="annot"><span class="annottext">subst :: PathComponent -&gt; [PathComponent]
</span><a href="#local-6989586621679679730"><span class="hs-identifier hs-var hs-var">subst</span></a></span></span><span> </span><span id="local-6989586621679679727"><span class="annot"><span class="annottext">component :: PathComponent
</span><a href="#local-6989586621679679727"><span class="hs-identifier hs-var">component</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-type">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PathComponent
</span><a href="#local-6989586621679679727"><span class="hs-identifier hs-var">component</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-386"></span><span>          </span><span class="annot"><a href="#local-6989586621679679730"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span id="local-6989586621679679726"><span class="annot"><span class="annottext">component :: PathComponent
</span><a href="#local-6989586621679679726"><span class="hs-identifier hs-var">component</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.Internal.html#Variable"><span class="hs-identifier hs-type">Variable</span></a></span><span> </span><span id="local-6989586621679679725"><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="#local-6989586621679679725"><span class="hs-identifier hs-var">variable</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-387"></span><span>              </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PathTemplateVariable -&gt; PathTemplateEnv -&gt; Maybe PathTemplate
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="#local-6989586621679679725"><span class="hs-identifier hs-var">variable</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679679733"><span class="hs-identifier hs-var">environment</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-388"></span><span>                  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679723"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679723"><span class="hs-identifier hs-var">components</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679723"><span class="hs-identifier hs-var">components</span></a></span><span>
</span><span id="line-389"></span><span>                  </span><span class="annot"><span class="annottext">Maybe PathTemplate
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>                        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PathComponent
</span><a href="#local-6989586621679679726"><span class="hs-identifier hs-var">component</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-comment">-- | The initial environment has all the static stuff but no paths</span><span>
</span><span id="line-392"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier hs-type">initialPathTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span>
</span><span id="line-393"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html#UnitId"><span class="hs-identifier hs-type">UnitId</span></a></span><span>
</span><span id="line-394"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>
</span><span id="line-395"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-396"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-397"></span><span id="initialPathTemplateEnv"><span class="annot"><span class="annottext">initialPathTemplateEnv :: PackageIdentifier
-&gt; UnitId -&gt; CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier hs-var hs-var">initialPathTemplateEnv</span></a></span></span><span> </span><span id="local-6989586621679679722"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679722"><span class="hs-identifier hs-var">pkgId</span></a></span></span><span> </span><span id="local-6989586621679679721"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679721"><span class="hs-identifier hs-var">libname</span></a></span></span><span> </span><span id="local-6989586621679679720"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679720"><span class="hs-identifier hs-var">compiler</span></a></span></span><span> </span><span id="local-6989586621679679719"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679719"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-398"></span><span>     </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; UnitId -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#packageTemplateEnv"><span class="hs-identifier hs-var">packageTemplateEnv</span></a></span><span>  </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679722"><span class="hs-identifier hs-var">pkgId</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679721"><span class="hs-identifier hs-var">libname</span></a></span><span>
</span><span id="line-399"></span><span>  </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#compilerTemplateEnv"><span class="hs-identifier hs-var">compilerTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679720"><span class="hs-identifier hs-var">compiler</span></a></span><span>
</span><span id="line-400"></span><span>  </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#platformTemplateEnv"><span class="hs-identifier hs-var">platformTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679719"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-401"></span><span>  </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#abiTemplateEnv"><span class="hs-identifier hs-var">abiTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679720"><span class="hs-identifier hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679679719"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-402"></span><span>
</span><span id="line-403"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#packageTemplateEnv"><span class="hs-identifier hs-type">packageTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html#UnitId"><span class="hs-identifier hs-type">UnitId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-404"></span><span id="packageTemplateEnv"><span class="annot"><span class="annottext">packageTemplateEnv :: PackageIdentifier -&gt; UnitId -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#packageTemplateEnv"><span class="hs-identifier hs-var hs-var">packageTemplateEnv</span></a></span></span><span> </span><span id="local-6989586621679679718"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679718"><span class="hs-identifier hs-var">pkgId</span></a></span></span><span> </span><span id="local-6989586621679679717"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679717"><span class="hs-identifier hs-var">uid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-405"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PkgNameVar"><span class="hs-identifier hs-var">PkgNameVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageIdentifier -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679718"><span class="hs-identifier hs-var">pkgId</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PkgVerVar"><span class="hs-identifier hs-var">PkgVerVar</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageIdentifier -&gt; Version
forall pkg. Package pkg =&gt; pkg -&gt; Version
</span><a href="Distribution.Package.html#packageVersion"><span class="hs-identifier hs-var">packageVersion</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679718"><span class="hs-identifier hs-var">pkgId</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-comment">-- Invariant: uid is actually a HashedUnitId.  Hard to enforce because</span><span>
</span><span id="line-408"></span><span>  </span><span class="hs-comment">-- it's an API change.</span><span>
</span><span id="line-409"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#LibNameVar"><span class="hs-identifier hs-var">LibNameVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679679717"><span class="hs-identifier hs-var">uid</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-410"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PkgIdVar"><span class="hs-identifier hs-var">PkgIdVar</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679679718"><span class="hs-identifier hs-var">pkgId</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-411"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#compilerTemplateEnv"><span class="hs-identifier hs-type">compilerTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-414"></span><span id="compilerTemplateEnv"><span class="annot"><span class="annottext">compilerTemplateEnv :: CompilerInfo -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#compilerTemplateEnv"><span class="hs-identifier hs-var hs-var">compilerTemplateEnv</span></a></span></span><span> </span><span id="local-6989586621679679709"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679709"><span class="hs-identifier hs-var">compiler</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-415"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#CompilerVar"><span class="hs-identifier hs-var">CompilerVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerId -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerInfo -&gt; CompilerId
</span><a href="Distribution.Compiler.html#compilerInfoId"><span class="hs-identifier hs-var hs-var">compilerInfoId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679709"><span class="hs-identifier hs-var">compiler</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-416"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-417"></span><span>
</span><span id="line-418"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#platformTemplateEnv"><span class="hs-identifier hs-type">platformTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-419"></span><span id="platformTemplateEnv"><span class="annot"><span class="annottext">platformTemplateEnv :: Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#platformTemplateEnv"><span class="hs-identifier hs-var hs-var">platformTemplateEnv</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679679705"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679679705"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679679704"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679704"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-420"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#OSVar"><span class="hs-identifier hs-var">OSVar</span></a></span><span class="hs-special">,</span><span>       </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OS -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679704"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-421"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#ArchVar"><span class="hs-identifier hs-var">ArchVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679679705"><span class="hs-identifier hs-var">arch</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-422"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#abiTemplateEnv"><span class="hs-identifier hs-type">abiTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-425"></span><span id="abiTemplateEnv"><span class="annot"><span class="annottext">abiTemplateEnv :: CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#abiTemplateEnv"><span class="hs-identifier hs-var hs-var">abiTemplateEnv</span></a></span></span><span> </span><span id="local-6989586621679679701"><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679701"><span class="hs-identifier hs-var">compiler</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679679700"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679679700"><span class="hs-identifier hs-var">arch</span></a></span></span><span> </span><span id="local-6989586621679679699"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679699"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-426"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#AbiVar"><span class="hs-identifier hs-var">AbiVar</span></a></span><span class="hs-special">,</span><span>      </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679679700"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">OS -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679679699"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-427"></span><span>                                          </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">CompilerId -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerInfo -&gt; CompilerId
</span><a href="Distribution.Compiler.html#compilerInfoId"><span class="hs-identifier hs-var hs-var">compilerInfoId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679701"><span class="hs-identifier hs-var">compiler</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-428"></span><span>                                          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CompilerInfo -&gt; AbiTag
</span><a href="Distribution.Compiler.html#compilerInfoAbiTag"><span class="hs-identifier hs-var hs-var">compilerInfoAbiTag</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679701"><span class="hs-identifier hs-var">compiler</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-429"></span><span>                                            </span><span class="annot"><span class="annottext">AbiTag
</span><a href="Distribution.Compiler.html#NoAbiTag"><span class="hs-identifier hs-var">NoAbiTag</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-430"></span><span>                                            </span><span class="annot"><a href="Distribution.Compiler.html#AbiTag"><span class="hs-identifier hs-type">AbiTag</span></a></span><span> </span><span id="local-6989586621679679694"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679694"><span class="hs-identifier hs-var">tag</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679694"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-431"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#AbiTagVar"><span class="hs-identifier hs-var">AbiTagVar</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; PathComponent
</span><a href="Distribution.Simple.InstallDirs.Internal.html#Ordinary"><span class="hs-identifier hs-var">Ordinary</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; PathComponent) -&gt; FilePath -&gt; PathComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">AbiTag -&gt; FilePath
</span><a href="Distribution.Compiler.html#abiTagString"><span class="hs-identifier hs-var">abiTagString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerInfo -&gt; AbiTag
</span><a href="Distribution.Compiler.html#compilerInfoAbiTag"><span class="hs-identifier hs-var hs-var">compilerInfoAbiTag</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerInfo
</span><a href="#local-6989586621679679701"><span class="hs-identifier hs-var">compiler</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-432"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#installDirsTemplateEnv"><span class="hs-identifier hs-type">installDirsTemplateEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#InstallDirs"><span class="hs-identifier hs-type">InstallDirs</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplateEnv"><span class="hs-identifier hs-type">PathTemplateEnv</span></a></span><span>
</span><span id="line-435"></span><span id="installDirsTemplateEnv"><span class="annot"><span class="annottext">installDirsTemplateEnv :: InstallDirTemplates -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#installDirsTemplateEnv"><span class="hs-identifier hs-var hs-var">installDirsTemplateEnv</span></a></span></span><span> </span><span id="local-6989586621679679691"><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-436"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#PrefixVar"><span class="hs-identifier hs-var">PrefixVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#prefix"><span class="hs-identifier hs-var hs-var">prefix</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-437"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#BindirVar"><span class="hs-identifier hs-var">BindirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#bindir"><span class="hs-identifier hs-var hs-var">bindir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-438"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#LibdirVar"><span class="hs-identifier hs-var">LibdirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libdir"><span class="hs-identifier hs-var hs-var">libdir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-439"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#LibsubdirVar"><span class="hs-identifier hs-var">LibsubdirVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#libsubdir"><span class="hs-identifier hs-var hs-var">libsubdir</span></a></span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-440"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DynlibdirVar"><span class="hs-identifier hs-var">DynlibdirVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#dynlibdir"><span class="hs-identifier hs-var hs-var">dynlibdir</span></a></span><span>  </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-441"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DatadirVar"><span class="hs-identifier hs-var">DatadirVar</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datadir"><span class="hs-identifier hs-var hs-var">datadir</span></a></span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-442"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DatasubdirVar"><span class="hs-identifier hs-var">DatasubdirVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#datasubdir"><span class="hs-identifier hs-var hs-var">datasubdir</span></a></span><span> </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-443"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#DocdirVar"><span class="hs-identifier hs-var">DocdirVar</span></a></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#docdir"><span class="hs-identifier hs-var hs-var">docdir</span></a></span><span>     </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-444"></span><span>  </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#HtmldirVar"><span class="hs-identifier hs-var">HtmldirVar</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates -&gt; PathTemplate
forall dir. InstallDirs dir -&gt; dir
</span><a href="Distribution.Simple.InstallDirs.html#htmldir"><span class="hs-identifier hs-var hs-var">htmldir</span></a></span><span>    </span><span class="annot"><span class="annottext">InstallDirTemplates
</span><a href="#local-6989586621679679691"><span class="hs-identifier hs-var">dirs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-445"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span>
</span><span id="line-448"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- Parsing and showing path templates:</span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="hs-comment">-- The textual format is that of an ordinary Haskell String, eg</span><span>
</span><span id="line-452"></span><span class="hs-comment">-- &quot;$prefix/bin&quot;</span><span>
</span><span id="line-453"></span><span class="hs-comment">-- and this gets parsed to the internal representation as a sequence of path</span><span>
</span><span id="line-454"></span><span class="hs-comment">-- spans which are either strings or variables, eg:</span><span>
</span><span id="line-455"></span><span class="hs-comment">-- PathTemplate [Variable PrefixVar, Ordinary &quot;/bin&quot; ]</span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679685"><span id="local-6989586621679679688"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-458"></span><span>  </span><span id="local-6989586621679679682"><span class="annot"><span class="annottext">show :: PathTemplate -&gt; FilePath
</span><a href="#local-6989586621679679682"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span> </span><span id="local-6989586621679679681"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679681"><span class="hs-identifier hs-var">template</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. Show a =&gt; a -&gt; FilePath
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[PathComponent] -&gt; FilePath
forall a. Show a =&gt; a -&gt; FilePath
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679681"><span class="hs-identifier hs-var">template</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-459"></span><span>
</span><span id="line-460"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679679674"><span id="local-6989586621679679676"><span id="local-6989586621679679678"><span class="annot"><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-461"></span><span>  </span><span id="local-6989586621679679669"><span class="annot"><span class="annottext">readsPrec :: Int -&gt; ReadS PathTemplate
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readsPrec</span></a></span></span><span> </span><span id="local-6989586621679679667"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679679667"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679679666"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679666"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[PathComponent] -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-var">PathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679665"><span class="hs-identifier hs-var">template</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679664"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-462"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679679663"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679663"><span class="hs-identifier hs-var">path</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679679664"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679664"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS FilePath
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="../../base/src/GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679679667"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679666"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-463"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679679665"><span class="annot"><span class="annottext">[PathComponent]
</span><a href="#local-6989586621679679665"><span class="hs-identifier hs-var">template</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadS [PathComponent]
forall a. Read a =&gt; ReadS a
</span><a href="../../base/src/Text.Read.html#reads"><span class="hs-identifier hs-var">reads</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679663"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-464"></span><span>
</span><span id="line-465"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-466"></span><span class="hs-comment">-- Internal utilities</span><span>
</span><span id="line-467"></span><span>
</span><span id="line-468"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#getWindowsProgramFilesDir"><span class="hs-identifier hs-type">getWindowsProgramFilesDir</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-469"></span><span id="getWindowsProgramFilesDir"><span class="annot"><span class="annottext">getWindowsProgramFilesDir :: IO FilePath
</span><a href="Distribution.Simple.InstallDirs.html#getWindowsProgramFilesDir"><span class="hs-identifier hs-var hs-var">getWindowsProgramFilesDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-cpp">
#ifdef mingw32_HOST_OS
</span><span>  </span><span id="local-6989586621679679661"><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621679679661"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CInt -&gt; IO (Maybe FilePath)
</span><a href="Distribution.Simple.InstallDirs.html#shGetFolderPath"><span class="hs-identifier hs-var">shGetFolderPath</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><a href="Distribution.Simple.InstallDirs.html#csidl_PROGRAM_FILES"><span class="hs-identifier hs-var">csidl_PROGRAM_FILES</span></a></span><span class="hs-cpp">
#else
</span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-identifier">m</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">Nothing</span><span class="hs-cpp">
#endif
</span><span>  </span><span class="annot"><span class="annottext">FilePath -&gt; IO FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Maybe FilePath -&gt; FilePath
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;C:\\Program Files&quot;</span></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621679679661"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-cpp">

#ifdef mingw32_HOST_OS
</span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#shGetFolderPath"><span class="hs-identifier hs-type">shGetFolderPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span id="shGetFolderPath"><span class="annot"><span class="annottext">shGetFolderPath :: CInt -&gt; IO (Maybe FilePath)
</span><a href="Distribution.Simple.InstallDirs.html#shGetFolderPath"><span class="hs-identifier hs-var hs-var">shGetFolderPath</span></a></span></span><span> </span><span id="local-6989586621679679658"><span class="annot"><span class="annottext">CInt
</span><a href="#local-6989586621679679658"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-480"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; (Ptr CWchar -&gt; IO (Maybe FilePath)) -&gt; IO (Maybe FilePath)
forall a b. Storable a =&gt; Int -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="../../base/src/Foreign.Marshal.Array.html#allocaArray"><span class="hs-identifier hs-var">allocaArray</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679679656"><span class="hs-identifier hs-var">long_path_size</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr CWchar -&gt; IO (Maybe FilePath)) -&gt; IO (Maybe FilePath))
-&gt; (Ptr CWchar -&gt; IO (Maybe FilePath)) -&gt; IO (Maybe FilePath)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679679655"><span class="annot"><span class="annottext">Ptr CWchar
</span><a href="#local-6989586621679679655"><span class="hs-identifier hs-var">pPath</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-481"></span><span>     </span><span id="local-6989586621679679654"><span class="annot"><span class="annottext">CInt
</span><a href="#local-6989586621679679654"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr () -&gt; CInt -&gt; Ptr () -&gt; CInt -&gt; Ptr CWchar -&gt; IO CInt
</span><a href="Distribution.Simple.InstallDirs.html#c_SHGetFolderPath"><span class="hs-identifier hs-var">c_SHGetFolderPath</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ()
forall a. Ptr a
</span><a href="../../base/src/GHC.Ptr.html#nullPtr"><span class="hs-identifier hs-var">nullPtr</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><a href="#local-6989586621679679658"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr ()
forall a. Ptr a
</span><a href="../../base/src/GHC.Ptr.html#nullPtr"><span class="hs-identifier hs-var">nullPtr</span></a></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Ptr CWchar
</span><a href="#local-6989586621679679655"><span class="hs-identifier hs-var">pPath</span></a></span><span>
</span><span id="line-482"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CInt
</span><a href="#local-6989586621679679654"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">CInt -&gt; CInt -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-483"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath -&gt; IO (Maybe FilePath)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-484"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679679650"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679650"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr CWchar -&gt; IO FilePath
</span><a href="../../base/src/Foreign.C.String.html#peekCWString"><span class="hs-identifier hs-var">peekCWString</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr CWchar
</span><a href="#local-6989586621679679655"><span class="hs-identifier hs-var">pPath</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath -&gt; IO (Maybe FilePath)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Maybe FilePath
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679679650"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-485"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-486"></span><span>    </span><span id="local-6989586621679679656"><span class="annot"><span class="annottext">long_path_size :: Int
</span><a href="#local-6989586621679679656"><span class="hs-identifier hs-var hs-var">long_path_size</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1024</span></span><span> </span><span class="hs-comment">-- MAX_PATH is 260, this should be plenty</span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#csidl_PROGRAM_FILES"><span class="hs-identifier hs-type">csidl_PROGRAM_FILES</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span>
</span><span id="line-489"></span><span id="csidl_PROGRAM_FILES"><span class="annot"><span class="annottext">csidl_PROGRAM_FILES :: CInt
</span><a href="Distribution.Simple.InstallDirs.html#csidl_PROGRAM_FILES"><span class="hs-identifier hs-var hs-var">csidl_PROGRAM_FILES</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CInt
</span><span class="hs-number">0x0026</span></span><span>
</span><span id="line-490"></span><span class="hs-comment">-- csidl_PROGRAM_FILES_COMMON :: CInt</span><span>
</span><span id="line-491"></span><span class="hs-comment">-- csidl_PROGRAM_FILES_COMMON = 0x002b</span><span class="hs-cpp">

#ifdef x86_64_HOST_ARCH
</span><span class="hs-cpp">#define CALLCONV ccall
</span><span class="hs-cpp">#else
</span><span class="hs-cpp">#define CALLCONV stdcall
</span><span class="hs-cpp">#endif
</span><span>
</span><span id="line-499"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">CALLCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;shlobj.h SHGetFolderPathW&quot;</span><span>
</span><span id="line-500"></span><span>            </span><span id="c_SHGetFolderPath"><span class="annot"><a href="Distribution.Simple.InstallDirs.html#c_SHGetFolderPath"><span class="hs-identifier hs-var">c_SHGetFolderPath</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-501"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span>
</span><span id="line-502"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-503"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span>
</span><span id="line-504"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.String.html#CWString"><span class="hs-identifier hs-type">CWString</span></a></span><span>
</span><span id="line-505"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Prelude.IO</span></span><span> </span><span class="annot"><a href="../../base/src/Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span class="hs-cpp">
#endif
</span></pre></body></html>